package it.cn.demo;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;

/**
 * 消息监听类
 */
public class MessageConsumer2 implements MessageListener {

    public void onMessage(Message message) {
        System.out.println("MessageConsumer2");
        System.out.println("接收到消息:"+new String (message.getBody()));
    }
}
